
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class ExchangeEquivalentCfg : public ManualSingleton <ExchangeEquivalentCfg>
{
	friend ManualSingleton <ExchangeEquivalentCfg>;
public:
	ExchangeEquivalentCfg();
	~ExchangeEquivalentCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const ExchangeEquivalentCfgInfo *GetExchangeEquivalentCfgInfo(int32_t equivalentId);
	const ExchangeEquivalentCfgMap *GetExchangeEquivalentCfgMap() { return &m_ExchangeEquivalentCfgMap; }
private:
	ExchangeEquivalentCfgMap m_ExchangeEquivalentCfgMap;
};

#define  g_MakeExchangeEquivalentCfgTable() (ExchangeEquivalentCfg::Instance())
#define  g_GetExchangeEquivalentCfgTable() (ExchangeEquivalentCfg::GetInstance())
#define  g_DelExchangeEquivalentCfgTable() (ExchangeEquivalentCfg::Destroy())